Flow Calling Node
The Flow Calling node lets you invoke another chatflow (sub-flow) from within your current conversation. This enables you to break complex conversations into reusable modules or delegate specific tasks to specialized flows.
π Overviewβ
- Purpose: Chain multiple chatflows together, passing control (and optionally context) from one to another.
- Use cases:
- Delegate a payment flow from a main support flow.
- Reuse an onboarding flow across different entry points.
- Organize large flows into smaller, maintainable components.
βοΈ Configuration Optionsβ
1. Model & Instructionβ
- Model (required): Choose which LLM (e.g.,
gpt-4
orgpt-3.5-turbo
) will be used when invoking the subflow. - Instruction (optional): A system prompt that modifies how the LLM interprets the transition into the subflow. This can help maintain tone, style, or context for the subflow's execution.
2. Select Chat Flowβ
- Field:
Select Chat Flow
(required) - Type: Dropdown
- Content: Lists all published chatflows in the current project (e.g.,
Chatflow for Recruiting
,DataAgent
). - Purpose: Select the target flow you want to invoke next.
π How It Worksβ
- Trigger: When execution reaches the Flow Calling node, the current flow pauses.
- Invoke: The selected subflow is launched in a fresh context but inherits any variables passed via the Instruction or shared context.
- Return: After the subflow completes or reaches its own end, control returns to the parent flow at the next node.
- Continue: Variables set or modified within the subflow can be referenced by the parent flow to guide further logic.
Example:
Main Flow:
β¦ β Flow Calling [ Select βDataAgentβ ] β [ resumes here after DataAgent completes ] β β¦
π Best Practicesβ
- Name flows descriptively: Use clear and meaningful names like
OnboardingFlow
orPaymentFlow
to clarify intent. - Limit deep nesting: Avoid chaining flows that themselves call multiple other flows to reduce complexity and debugging difficulty.
- Pass context sparingly: Share only the necessary variables with the subflow; keep unrelated state isolated to avoid unexpected behavior.
- Version carefully: When updating a subflow, ensure all parent flows invoking it continue to work as expected.
- Use Instructions: Use system prompt instructions to control the tone, style, or behavior within the subflow during transitions.
Tip: You can chain multiple Flow Calling nodes consecutively to build complex multi-module conversations, but always thoroughly test the full end-to-end user experience!